bitkeeper revision 1.1159.1.404 (41923b0epYovqxxi6oRwepHm8dm7JQ)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Wed, 10 Nov 2004 16:00:14 +0000 (16:00 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Wed, 10 Nov 2004 16:00:14 +0000 (16:00 +0000)
Add irq_enter/irq_exit to local timer interrupt.

linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c

index b18b93c348ae32f5ab33c755812ad99f3a9503ca..ea049218e0b71f6c3db69defee38105374d3fcc7 100644 (file)
@@ -402,12 +402,11 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
                processed_system_time += NS_PER_TICK;
                do_timer(regs);
 #ifdef CONFIG_SMP
-               if (regs)       /* XXXsmp this needs to be done on every cpu
-                                * - every tick - maybe  */
-                   update_process_times(user_mode(regs));
+               if (regs)
+                       update_process_times(user_mode(regs));
 #endif
                if (regs)
-                   profile_tick(CPU_PROFILING, regs);
+                       profile_tick(CPU_PROFILING, regs);
        }
 
        /*
@@ -712,9 +711,16 @@ static irqreturn_t local_timer_interrupt(int irq, void *dev_id,
        if ((xxx++ % 100) == 0)
                xxprint("local_timer_interrupt\n");
 
+       /*
+        * update_process_times() expects us to have done irq_enter().
+        * Besides, if we don't timer interrupts ignore the global
+        * interrupt lock, which is the WrongThing (tm) to do.
+        */
+       irq_enter();
        /* XXX add processed_system_time loop thingy */
        if (regs)
                update_process_times(user_mode(regs));
+       irq_exit();
 
        return IRQ_HANDLED;
 }